
package com.ruoyi.gisconverter.core.type;



import com.ruoyi.gisconverter.core.FeatureFactory;
import org.geotools.data.FeatureSource;

import java.io.File;


public abstract class FileProcess {
    
    protected FeatureFactory ff = null;

    public FileProcess() {
        ff = FeatureFactory.getInstance();
    }
    
    /**
     *
     * @param file the file parameter will be read, not null
     * @return the FeatureSource, null if not processed
     */
    public abstract FeatureSource readFile(File file);

     /**
     *
     * @param fs the FeatureSouce where the features and properties have, not null
     * @param file the file where the features will be written, not null
     */
    public abstract void writeFile(FeatureSource fs, File file);
    
    public FeatureFactory getFeatureFactory(){
        return ff;
    }
}
